package com.itheima.job6;

import java.util.*;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Map<Character,Integer> map = new HashMap<>();
        Set<Character> keySet = new HashSet<>();
        String input = sc.nextLine();
        for (int i = 0; i < input.length(); i++) {
            keySet.add(input.charAt(i));
        }
        for (Character character : keySet) {
            int count=0;
            for (int i = 0; i < input.length(); i++){
                if (character==input.charAt(i)){
                    count++;
                }
            }
            map.put(character,count);
        }
        map.forEach((key,value)-> System.out.println(key+" "+value));
    }
}
